<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 

class ED_Config extends CI_Config {

/**
* CodeIgniter Config Extended Library
*
* This class extends the config to a database
*
* @package     CodeIgniter
* @subpackage  Extended Libraries
* @category    Extended Libraries
* @author      Tim Wood (aka codearachnid)
* @author      Modified by Daniel G Wood (no relation!)
* @link        http://www.codearachnid.com/ci/db_fetch
*/

    function ED_Config()
    {
        parent::CI_Config();
    }
    
    function db_config_fetch()
    {
        $CI =& get_instance();
        $query = $CI->db->get('site_config');
        
        foreach ($query->result() as $row)
        {
            $this->set_item($row->config_key, $row->config_value);
        }
        
    }
    
}

?>